package com.central.apps.controller;


import com.central.app.service.HandlerService;
import com.central.apps.entity.BlInsparealine;
import com.central.apps.entity.BlInsparealocation;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@Api(tags = "测试controller")
@RequestMapping("/Pm")
public class PmMgController {
    @Autowired
    private HandlerService handlerService;

    @PostMapping("/SelectLx")
    public String InsertLx(@RequestBody JSONObject insae) {
        log.info("===================wonum: "+insae.get("insaenum")+"========="+insae.get("wonum"));
        String wonum = (String) insae.get("wonum");
        String insaenum = (String) insae.get("insaenum");
        String getLocationListSql ="select * from bl_insparealocation where insaenum ='"+insaenum+"'";
        List<Map<String, Object>> LocationList = handlerService.findBySql(getLocationListSql);
        JSONObject json = new JSONObject();
        json.put("code", "0");
        //json.put("blInspectlocationList", blInspectlocation);

        return  "";
    }


}
